POV-Ray : Newsgroups : povray.binaries.images : lightsource: looks_like on one side : lightsource: looks_like on one side Server Time
19 Nov 2024 20:48:47 EST (-0500)
  lightsource: looks_like on one side  
From: marabou
Date: 5 Nov 2001 10:17:03
Message: <3be6ad6d@news.povray.org>
hello,

as probed different lamps i get confused as i tried this:
a lamp consists of a quarter of a sphere and has a flat cylinder on it 
which emitts the light and hangs on a wall (see pic). 
at first i tried to make this object and give to light_source the parameter 
"look_as", second i build this object with a light_source in it.
both times the results are not satifactionally (see pics).
does someone know what i did not see?

first call:
light_source {
        < 0,0,0 >
        color White
        looks_like { hohllampe (off)}
        translate < towhereyouwant >
}

second call:
object { hohllampe(on)
        translate < towhereyouwant >
}

//code for
//------------------------------hohllampe
//glow = on -> self glowing
//glow = whatyouwant -> not self glowing

#macro hohllampe (glow)

union{
difference{
//main body
sphere {
        <0,0,0>,1
        scale <0.15,0.15,0.15>
}
//two boxes cut the sphere
box {
        <-0.5,0,-0.5>,<0.5,1,0.5>
}
box {
        <-0.5,-0.5,0>,<0.5,0.5,1>
}
        pigment {color White}
        //finish {ambient 0}
}//difference main body
//light source
cylinder{
        <0,0,0>,<0,1,0>,1
        scale <0.15,0.01,0.15>
        pigment { color White}
        no_shadow
        finish{ ambient 0.25}
}
#if (glow=on)
        light_source {
                <0.07,0.005,-0.07>
                color White
                adaptive 1
        }
#end//if
}//union
#end//macro
//------------------------------hohllampe


Post a reply to this message


Attachments:
Download 'lampprob.jpg' (9 KB)

Preview of image 'lampprob.jpg'
lampprob.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.